1. Field of the Invention
The invention relates generally to the field of digital image processing and more particularly to luminance processing that is based upon color dependence.
2. Description of the Related Art
Color filters are used in black and white photography to modify contrast in the captured image. For example, yellow filters are used in outdoor black and white photography to darken the sky and reduce haze. However, when the same filters are applied to color photography an undesirable yellow color cast can result.
Further, the filters used in photography are conventionally applied to the image globally. In other words, a certain color (or combination color) filter is applied to the entire image. While the filter may change one portion of the image in a desired fashion, there is a possibility that another portion of the image will be adversely affected. Therefore, conventional filters always present a trade-off between desirable and undesirable effects. The invention overcomes these problems as discussed below.
The invention includes a method for developing a photographic image from a digitized color image by filtering the image and developing the image. Filtering of the image entails separating the image into a luminance channel and chrominance channels, altering the luminance channel by modifying the red, green and blue coefficients used to generate the luminance channel based upon a filter color to produce the altered luminance channel and recombining the chrominance channels and the altered luminance channel. The hue controls the color of filtering and the saturation controls the strength of the filtering. Prior to separating and converting the linear exposure is converted to a logarithmic space. This conversion of linear exposure to logarithmic space allows the luminance""s channel to be altered independently from the chrominance channels. The alteration creates a filtered RGB to YCrCb matrix and applying the matrix to the logarithmic space produces a filtered logarithmic space. The invention returns to the RGB space by applying the YCrCb to RGB matrix to the filtered logarithmic space.
Alternatively, the system for developing a photographic image includes a filter applied to the image, a divider adapted to separate the image into luminance and chrominance channels, a saturation control and a hue control adapted to alter the luminance channel and to produce an altered luminance channel, and an adder adapted to recombine the chrominance channels and the altered luminance channel. The hue control changes the color of the filter and the saturation control changes the strength of the filter. Further, a converter is adapted to convert the image into a linear exposure and the linear exposure to a logarithmic space. The converter allows the luminance channel to be altered independently from the chrominance channels. The saturation input and the hue input produce a filtered RGB to YCrCb matrix and the invention applies the matrix to a logarithmic space to produce a filtered logarithmic space. The adder applies YCrCb to RGB matrix to the filtered logarithmic space.
With the invention, color filters can be synthesized for a digitized color image and applied to the image to modify the contrast without imparting a color cast. Further, the invention allows unrenderable portions of the image that are too bright or too dark to be modified based upon chrominance so as to bring the unrenderable portions into a mid-tone range and make them renderable.
Using the invention, the filter applied (e.g., the calculation of the luminance channel) could optionally be a function of the color coordinates described by the chrominance, the pixel""s location in the image, the proximity to other colors/hues, or results from other image analysis/image understanding algorithms. Thus, the invention allows different filters to be selectively applied to different portions of the image. For example, the calculation of blue regions may suppress blue to darken a blue sky, while a flesh tone region may use a different filter to alter contrast differently in those regions.